home *** CD-ROM | disk | FTP | other *** search
- package com.supercede.forms;
-
- import java.awt.Component;
- import java.io.Serializable;
- import java.util.Enumeration;
- import java.util.Vector;
-
- public class SuperCedeRuntimeInfo implements Serializable {
- private Vector connections;
- protected Vector layoutConstraintsList = new Vector();
- private static final long serialVersionUID = 1013082004010516618L;
- private static final int _version = 1;
- private int version = 1;
-
- public int getNumConnections() {
- return this.connections.size();
- }
-
- public SuperCedeConnectionDescriptor getConnection(int var1) {
- return (SuperCedeConnectionDescriptor)this.connections.elementAt(var1);
- }
-
- public void setConnections(Vector var1) {
- this.connections = var1;
- }
-
- public void addConnection(SuperCedeConnectionDescriptor var1) {
- this.connections.addElement(var1);
- }
-
- public boolean removeConnection(SuperCedeConnectionDescriptor var1) {
- return this.connections.removeElement(var1);
- }
-
- public Enumeration getConnectionElements() {
- return this.connections.elements();
- }
-
- public synchronized void addLayoutConstraints(Component var1, Object var2) {
- int var3 = this.findLayoutConstraints(var1);
- if (var3 < 0) {
- this.layoutConstraintsList.addElement(new LayoutConstraintsInfo(var1, var2));
- } else {
- LayoutConstraintsInfo var4;
- try {
- var4 = (LayoutConstraintsInfo)this.layoutConstraintsList.elementAt(var3);
- } catch (ArrayIndexOutOfBoundsException var5) {
- var4 = null;
- }
-
- var4.constraints = var2;
- }
- }
-
- public synchronized void removeLayoutConstraints(Component var1) {
- int var2 = this.findLayoutConstraints(var1);
- if (var2 >= 0) {
- try {
- this.layoutConstraintsList.removeElementAt(var2);
- } catch (ArrayIndexOutOfBoundsException var3) {
- }
- }
- }
-
- public synchronized Object getLayoutConstraints(Component var1) {
- int var3 = this.findLayoutConstraints(var1);
- Object var2;
- if (var3 < 0) {
- var2 = null;
- } else {
- try {
- LayoutConstraintsInfo var4 = (LayoutConstraintsInfo)this.layoutConstraintsList.elementAt(var3);
- var2 = var4.constraints;
- } catch (ArrayIndexOutOfBoundsException var5) {
- var2 = null;
- }
- }
-
- return var2;
- }
-
- private int findLayoutConstraints(Component var1) {
- int var2 = 0;
-
- int var3;
- for(var3 = this.layoutConstraintsList.size(); var2 < var3; ++var2) {
- LayoutConstraintsInfo var4;
- try {
- var4 = (LayoutConstraintsInfo)this.layoutConstraintsList.elementAt(var2);
- } catch (ArrayIndexOutOfBoundsException var5) {
- var4 = null;
- }
-
- if (var4 == null) {
- var2 = var3;
- break;
- }
-
- if (var4.comp == var1) {
- break;
- }
- }
-
- return var2 >= var3 ? -1 : var2;
- }
-
- public void runTimeInit(Object var1) {
- for(int var2 = 0; var2 < this.connections.size(); ++var2) {
- this.getConnection(var2).runTimeInit(var1);
- }
-
- }
- }
-